<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePositionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('positions', function (Blueprint $table) {
            $table->increments('id');
            $table->timestamps();
            $table->integer('uid');//职位发布者id
            $table->string('position_name',50);//职位名称-
            $table->string('pay',50);//薪资-
            $table->integer('look_number')->default(0);//浏览次数
            $table->integer('apply_number')->default(0);//申请次数
            $table->integer('attract_number')->default(1);//招人数
            $table->string('zhiwei',50);//职位-
            $table->string('age_limit')->default('经验不限');//要求经验年限-
            $table->string('province',20)->nullable();//省-
            $table->string('city',20)->nullable();//市-
            $table->string('area',20)->nullable();//区-
            $table->string('detailed_address')->nullable();//详细地址-
            $table->string('job_description',2000)->nullable();//职位描述-
            $table->string('phone');//联系电话-
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('positions');
    }
}
